package com.teaphy.coroutinecrawler.flow.operators

import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*

fun main() = runBlocking {
    flow {
        emit(1)
        emit(1)
        emit(2)
        emit(3)
        emit(1)
        emit(4)
    }.distinctUntilChanged()
        .collect {
        println("接收到的数据：$it")
    }

    println("Done")
}